﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace GameProject
{
    class Monument
    {
        private Texture2D monumentSprite;
        private Vector2 monumentPosition;
        private Rectangle monumentHitBox;
        private int health;
        private SpriteFont Font;
        private string healthString;

        public Monument() { }

        public void Initialize()
        {
            health = 30;
            monumentPosition = new Vector2(500 - 27, 500 - 27);
            monumentHitBox = new Rectangle((int)monumentPosition.X, (int)monumentPosition.Y, 55, 55);
        }
        public void LoadContent(ContentManager Content)
        {
            monumentSprite = Content.Load<Texture2D>("monumentSprite");
            Font = Content.Load<SpriteFont>("SpriteFont1");
            healthString = health.ToString();
        }
        public void Update(GameTime gameTime)
        {
            healthString = health.ToString();
        }
        public void Draw(SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(monumentSprite, monumentPosition, Color.White);
            //spriteBatch.DrawString(Font, "Health: " + healthString, new Vector2(200, 0), Color.Black);
            //spriteBatch.DrawString(Font, healthString, new Vector2(290, 0), Color.Black);
            spriteBatch.DrawString(Font, healthString, new Vector2(490, 490), Color.Black);
        }
        public void damageToHealth(int damage) { this.health += damage; }
        public int getHealth() { return this.health; }
        public Rectangle getHitBox()
        {
            return monumentHitBox;
        }
        public Vector2 getMonumentMiddle()
        {
            float x, y;
            x = getMonumentX() + 27;
            y = getMonumentY() + 27;
            Vector2 temp = new Vector2(x, y);
            return temp;
        }
        public float getMonumentX()
        {
            return monumentPosition.X;
        }
        public float getMonumentY()
        {
            return monumentPosition.Y;
        }
    }
}
